feat: get codegen from comline-codelib-gen, not comline-core - #16
Merged
Conversation
Code generation moved to ComlineProject/generation (de-rot G1b). The CLI is the composition root: it compiles schemas via comline-core and picks a generator via comline-codelib-gen. - Cargo.toml: add comline-codelib-gen (generation git rev f17c210); move comline-core from crates.io 0.1.0 to the same core git rev (d8bc708) comline-codelib-gen uses, so the tree has one comline-core. - generate.rs / clean.rs: comline_core::codelib_gen::find_generator -> comline_codelib_gen::code_gen::find_generator. Behaviour note: generation's find_generator is version-exact (only "1.70.0" is registered) where core's ignored the version. All fixtures and `comline new` scaffolding use rust#1.70.0, so no test changes. cargo test: 36 passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
De-rot G1b — the second half of moving code generation out of
core. Pairs with core#41 (removescodelib_genfromcore).The CLI is the composition root: compile schemas via
comline-core, pick a generator viacomline-codelib-gen.Changes
Cargo.toml— addcomline-codelib-gen(generationgit revf17c210). Movecomline-corefrom crates.io0.1.0to the samecoregit rev (d8bc708) thatcomline-codelib-genpins, so the dependency tree has a singlecomline-core(a registry + git pair at the same version would be two incompatible crates →FrozenUnittype mismatch).generate.rs/clean.rs—comline_core::codelib_gen::find_generator→comline_codelib_gen::code_gen::find_generator.Notes
generation'sfind_generatoris version-exact (only"1.70.0"is registered) wherecore's ignored the version. Every fixture andcomline new's scaffolding usesrust#1.70.0, so no test changes — but arust#1.71.0target would now say "no generator" untilgenerationadds keys.comline-core/comline-codelib-gencut releases..cargo/config.toml(gitignored) already documents the local-[patch]escape hatch forcomline-core.cargo test: 36 passed.Design: design/generation.md → G1b.